import request from '@/utils/request'

export function inbounding(inboundForm) {//入库操作
    return request({
        url: '/v2/wms-inbound-order',
        headers: {
            isToken: true
        },
        method: 'post',
        data: inboundForm
    });
}
export function getInboundTypeList() {//获取入库类型
    return request({
        url: '/system/inboundType/list',
        headers: {
            isToken: true
        },
        method: 'get',
    });
}
export function getInboundOrderList(data) {//获取入库单列表
    return request({
        url: '/v2/wms-inbound-order/list',
        // url: '/system/inboundOrder/list',
        headers: {
            isToken: true
        },
        params: data,
        method: 'get',
    });
}

export function getOrderCode() {//获取入库单单号
    return request({
        url: '/v2/wms-inbound-order/getInboundOrderCode',
        headers: {
            isToken: true
        },
        method: 'get',
    });
}



export function getJadeCode() {//获取翡翠货品编号
    return request({
        url: '/system/jade/getJadeCode',
        headers: {
            isToken: true
        },
        method: 'get',
    });
}

export function addJade(jadeForm) {//新增货品
    return request({
        url: '/system/jade',
        headers: {
            isToken: true
        },
        data: jadeForm,
        method: 'post',
    });
}

export function getJadeCrop(jadeUrl) {//图像分割
    return request({
        url: '/api/image/crop',
        headers: {
            isToken: true
        },
        data: jadeUrl,
        method: 'post',
    });
}
export function getJadeFeature(jadeList) {//提取特征
    return request({
        url: '/api/image/feature',
        headers: {
            isToken: true
        },
        data: jadeList,
        method: 'post',
    });
}
export function getJadeType() {//获取品类列表
    return request({
        url: '/system/jadeType/simplist',
        headers: {
            isToken: true
        },
        method: 'get',
    });
}
// pageNum,pageSize,orderCode,jadeCode,supplierId,warehouseId
export function getInJadeList(data) {//获取入库货品列表
    return request({
        // url: '/system/inboundOrder/inList',
        url: '/v2/wms-inbound-order/inList',
        headers: {
            isToken: true
        },
        params: data,
        method: 'get',
    });
}

export function merge(selectIds) {//合并入库单
    return request({
        url: '/v2/wms-inbound-order/merge',
        headers: {
            isToken: true
        },
        method: 'post',
        data: selectIds.mergeOrderIds,
    })
}
export function getCipherText(price) {//生成暗码
    return request({
        url: '/system/ciphertext/change',
        headers: {
            isToken: true
        },
        method: 'post',
        data: price
    })
}

export function getAuditOrder(data) {// 获取库存调整单列表
    return request({
        url: '/system/adjustOrder/list',
        headers: {
            isToken: true
        },
        method: 'post',
        data: data
    })
}

export function getAuditOrderDetail(data) {// 获取库存调整单明细
    return request({
        url: '/system/adjustOrder/detail',
        headers: {
            isToken: true
        },
        method: 'get',
        params: data
    })
}

export function getJadeDetail(data) {// 获取库存调整单明细
    return request({
        url: '/system/adjustOrder/jade/detail',
        headers: {
            isToken: true
        },
        method: 'get',
        params: data
    })
}

export function createAdjustOrder(data) {// 创建库存调整单
    return request({
        url: '/system/adjustOrder/create',
        headers: {
            isToken: true
        },
        method: 'post',
        data: data
    })
}

export function getcheckOrder(data) {// 获取盘点单列表
    return request({
        url: '/system/checkOrder/list',
        headers: {
            isToken: true
        },
        method: 'post',
        data: data
    })
}

export function createCheckOrder(data) {// 新建盘点单
    return request({
        url: '/system/checkOrder/create',
        headers: {
            isToken: true
        },
        method: 'post',
        data: data
    })
}

export function getEmployee() {// 获取调整人员列表
    return request({
        url: '/system/adjustOrder/employee',
        headers: {
            isToken: true
        },
        method: 'get'
    })
}

export function getRelations() {// 获取仓库仓位列表
    return request({
        url: '/system/warehouse/getRelations',
        headers: {
            isToken: true
        },
        method: 'get'
    })
}

export function getcheckOrderJade(data) {// 获取盘点单所有翡翠
    return request({
        url: '/system/checkOrder/jade',
        headers: {
            isToken: true
        },
        method: 'get',
        params: data
    })
}

export function getcheckOrderDetail(data) {// 获取盘点单详情
    return request({
        url: '/system/checkOrder/detail',
        headers: {
            isToken: true
        },
        method: 'get',
        params: data
    })
}

export function resultCheckOrder(data) {// 结束盘点
    return request({
        url: '/system/checkOrder/stop',
        headers: {
            isToken: true
        },
        method: 'post',
        data: data
    })
}

export function auditList(data) {// 获取审核列表
    return request({
        url: '/system/audit/list',
        headers: {
            isToken: true
        },
        method: 'get',
        params: data
    })
}

export function auditRequest(data) {// 发送审核结果
    return request({
        url: '/system/audit',
        headers: {
            isToken: true
        },
        method: 'post',
        data: data
    })
}